<template>


  <div>
    <div v-show="false">
      <oos-popup :title="title" :visible.sync="visible">
        <template v-slot:popup-context>
          <div class="config_vc_ctp">
            <el-form :model="vc" ref="ruleForm" label-width="150px" class="config_form">

              <el-form-item label="业务类型" prop="adaptationType">
                <el-select v-model="vc.vcType" clearable
                           placeholder="请选择类型" class="read_input">
                  <el-option
                      v-for="(i,index) in xc_ctpSignalType"
                      :key="index"
                      :value="i">
                  </el-option>
                </el-select>
              </el-form-item>

              <el-form-item label="时隙">
                <el-input v-model="vc.mappingPath"></el-input>
              </el-form-item>

              <el-form-item label="J1 实际发送开销">
                <el-input v-model="vc.J1ActualTx"></el-input>
              </el-form-item>

              <el-form-item label="J1 期望接收开销">
                <el-input v-model="vc.J1ExpectedRx"></el-input>
              </el-form-item>

              <el-form-item label="J1 实际接收开销">
                <el-input v-model="vc.J1ActualRx" readonly class="read_input"></el-input>
              </el-form-item>

              <el-form-item>
                <el-image
                    style="width: 20px; height: 25px;"
                    :src="require('@/assets/union_rule_font.jpg')"
                    :preview-src-list="[require('@/assets/union/vcCtpPac.jpg')]">
                </el-image>
                <el-button type="primary" @click="submitForm('ruleForm')">确认</el-button>
                <el-button @click="resetForm('ruleForm')">重置</el-button>
              </el-form-item>
            </el-form>
          </div>
        </template>
      </oos-popup>
    </div>

    <el-dialog
        :visible.sync="isVisible"
        width="1000px"
        :close-on-click-modal="false"
        @open="load"
        @close="handleClose">
      <div slot="title" class="header-title" :style="{'background':'#2b7ffd','color':'#fff'}">
        <div style="padding:15px 20px;">{{ title }}</div>
      </div>
      <div class="config_vc_ctp">
        <el-form :model="vc" ref="ruleForm" label-width="150px" class="config_form">

          <el-form-item label="业务类型" prop="adaptationType">
            <el-select v-model="vc.vcType" clearable
                       placeholder="请选择类型" class="read_input">
              <el-option
                  v-for="(i,index) in xc_ctpSignalType"
                  :key="index"
                  :value="i">
              </el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="时隙">
            <el-input v-model="vc.mappingPath"></el-input>
          </el-form-item>

          <el-form-item label="J1 实际发送开销">
            <el-input v-model="vc.J1ActualTx"></el-input>
          </el-form-item>

          <el-form-item label="J1 期望接收开销">
            <el-input v-model="vc.J1ExpectedRx"></el-input>
          </el-form-item>

          <el-form-item label="J1 实际接收开销">
            <el-input v-model="vc.J1ActualRx" readonly class="read_input"></el-input>
          </el-form-item>

          <el-form-item>
            <el-image
                style="width: 20px; height: 25px;"
                :src="require('@/assets/union_rule_font.jpg')"
                :preview-src-list="[require('@/assets/union/vcCtpPac.jpg')]">
            </el-image>
            <el-button type="primary" @click="submitForm('ruleForm')">确认</el-button>
            <el-button @click="resetForm('ruleForm')">重置</el-button>
          </el-form-item>
        </el-form>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import OosPopup from "@/components/popup/OosPopup";
import {xc_ctpSignalType} from "@/assets/config/XcProperty";

export default {
  name: "VcCtpPopup",
  components: {OosPopup},
  data() {
    return {
      xc_ctpSignalType,
      vc: {
        vcType: '',
        mappingPath: '',
        J1ActualTx: '',
        J1ExpectedRx: '',
        J1ActualRx: ''
      },

      isVisible: false,

    }
  },
  props: ['visible', 'title', 'node', 'ptp'],
  methods: {
    submitForm() {

    },
    resetForm() {

    },
    handleClose() {
      this.isVisible = !this.visible;
      this.$emit('update:message', this.isVisible)
    },

    load() {
        this.isVisible = this.visible;
    }
  },
  mounted() {
    console.log('C: ',this.visible)
  }
}
</script>

<style scoped>
/*<!--使用css样式穿透,input框的样式就没了-->*/
.read_input >>> .el-input__inner {
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: none;
  border-radius: 0;
}
</style>